home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / PRG / Depth lib 1.0 folder.sit / Depth lib 1.0 folder / depth_lib 1.0 ƒ / depth 1.0 source & libs / depth.h < prev    next >
Text File  |  1995-12-06  |  2KB  |  45 lines

  1. // depth.h
  2. //
  3. // Library routines for getting and setting the color depth for monitors.
  4. // All of the code originated from Kenneth Worley's Monitor Tricks 1.51 in C++.
  5. // Changed to C by Mark Womack.
  6. //
  7.  
  8. // Convienent constants
  9.  
  10. #define kMillionsColors        32
  11. #define kThousandsColors    16
  12. #define    k256Colors            8
  13. #define    k16Colors            4
  14. #define    k4Colors            2
  15. #define    k2Colors            1
  16.  
  17. #define    kGrayMode            0
  18. #define    kColorMode            1
  19.  
  20. // Public routines
  21.  
  22. // MaxScreenDepth returns the maximum bit depth that the monitor is capable of.
  23. extern pascal short    MaxScreenDepth( GDHandle theGDevice );
  24.  
  25. // Returns true if the monitor supports the given depth
  26. extern pascal Boolean SupportsDepth( GDHandle theGDevice, short aDepth);
  27.  
  28. // GetScreenDepth returns the current bit depth of this monitor.
  29. extern pascal short GetScreenDepth( GDHandle theGDevice );
  30.  
  31. // SetScreenDepth changes the bit depth of the screen
  32. extern pascal void    SetScreenDepth( GDHandle theGDevice, short newDepth );
  33.  
  34. // Returns true if the monitor supports the given mode
  35. extern pascal Boolean SupportsMode( GDHandle theGDevice, short aMode);
  36.  
  37. // GetScreenMode returns one if the monitor is displaying colors, zero if it's displaying in grays.
  38. extern pascal short GetScreenMode( GDHandle theGDevice );
  39.  
  40. // SetScreenMode sets this monitor to color if 1 is sent, or grays if zero is sent.
  41. extern pascal void    SetScreenMode( GDHandle theGDevice, short newMode );
  42.  
  43. // SetScreenModeDepth sets the monitor to the color mode and depth specified.
  44. extern pascal void    SetScreenModeDepth( GDHandle theGDevice, short newDepth, short newMode );
  45.